import request from '@/utils/request'

// 库区管理
// 库区列表接口
export const getList = (data) => request.get('/api/goods/pageDetail', {
  params: {
    id: data.id,
    name: data.name,
    ownerName: data.ownerNameName,
    code: data.code,
    size: data.size,
    current: data.current
  }
})

// 搜索接口
export const search = (data) => request.get('/api/area/pageDetail', {
  params: {
    id: data.id,
    name: data.name,
    warehouseName: data.warehouseName,
    size: data.size,
    current: data.current,
    status: data.status
  }
})

// detail3的接口
export const code = () => request.get('/api/codeFactory/next/HP')

export const goodsType = (data) => request.get('/api/goodsType/vague', { params: { params: data.params } })
export const owner = (data) => request.get('/api/owner/vague', { params: { params: data.params } })
export const list = (ownerId) => request.get('/api/area/list', { params: { ownerId: ownerId } })
// 提交接口
export const add = (data) => request.post('/api/goods', data)

// 编辑获取信息接口
export const getEdit = (id) => request.get(`/api/goods/${id}`)

// 编辑提交接口
export const editSubmit = (data) => request.put('/api/goods', data)
